﻿using System.Xml.Linq;
using System.Collections.Generic;
using System.Linq;

namespace PIT.Labs.ProjectRepository.Owl2DotNet.Rdf
{
    class RdfNamedIndividual : RdfIndividual
    {
        public RdfNamedIndividual(XElement node, RdfOntology o) : base(node, o)
        {
        }
    }

    class RdfIndividual : RdfEntityBase, IIndividual
    {
        internal List<RdfClass> instanceOf = null;
        
        public RdfIndividual(XElement node, RdfOntology o) : base(node, o)
        {
            o.Insert(this);
        }

        public IEnumerable<IClass> InstanceOf
        {
            get
            {
                if (instanceOf == null)
                {
                    instanceOf = new List<RdfClass>();
                    RdfXmlParser.GetInstanceClasses(this);
                }
                return instanceOf.Select(x => (IClass)x);
            }
        }


        public IDictionary<IDataProperty, IValue> DataProperties
        {
            get { throw new System.NotImplementedException(); }
        }

        public IDictionary<IObjectProperty, IIndividual> ObjectProperties
        {
            get { throw new System.NotImplementedException(); }
        }
    }
}
